package com.xgz.entity;

import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.List;

@Table(name = "t_menu")
@Data
@AllArgsConstructor
@NoArgsConstructor

//@ApiModel(value = "TMenu)", description = "")
public class TMenu implements Serializable {
 private static final long serialVersionUID = 120926124880819662L;
 @Id
 @Column(name = "id")
 private Integer id;
@Column(name = "mname")
 //@ApiModelProperty(value = "${column.comment}")
private String mname;

@Column(name = "pid")
 //@ApiModelProperty(value = "${column.comment}")
private Integer pid;

@Column(name = "url")
 //@ApiModelProperty(value = "${column.comment}")
private String url;

@Column(name = "icon")
 //@ApiModelProperty(value = "${column.comment}")
private String icon;

 // 一个父菜单下面有多个子菜单  t_menu
 @Transient // 通用mapper里面进行查询的时候该属性不参与查询
 private List<TMenu> sonMenus=new ArrayList<>();
}

